package com.alliky.core.data.dao

import androidx.paging.PagingSource
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.rrc.common.entity.GoodsVO

/**
 * ================================================
 * @Description: 描述
 * @Author: wxianing
 * @Date: 2022/11/24 16:56
 * ================================================
 */
@Dao
interface GoodsDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertGoods(data: List<GoodsVO>)

    @Query("SELECT * FROM GoodsVO")
    fun queryAllGoods(): PagingSource<Int, GoodsVO>

    @Query("Delete FROM GoodsVO")
    fun clear()
}